import { createRouter, createWebHistory } from 'vue-router'
import { componentRoutes } from './component'

export const routes = [
  {
    path: '',
    name: 'Home',
    component: () => import('@/layouts/BaseLayout.vue'),
    children: [
      {
        path: '',
        name: 'home',
        component: () => import('@/views/HomePage.vue'),
      },
      {
        path: '/component',
        name: 'component',
        component: () => import('@/layouts/ComponentLayout.vue'),
        children: componentRoutes,
      },
      {
        path: '/quick-start',
        name: 'quick-start',
        component: () => import('@/views/QuickStart.vue'),
      },
    ],
  },
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
